﻿@{
    ViewBag.Title = "设备台账";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
    <script src="~/Areas/Dev/ViewModels/Dev.viewModel.search.js"></script>
    <script type="text/javascript">
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        var viewModel = function(){
            var self = this;
            Dev.viewModel.search.apply(this,arguments);
        }
        ko.bindingViewModel(new viewModel(data));
    </script>
}
<div class="z-toolbar">
    <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
    <a id="a_export" href="#" class="easyui-splitbutton" data-options="menu:'#dropdown',iconCls:'icon-download'">导出</a>
</div>

<div id="dropdown" style="width:100px; display:none;">
    <div data-options="iconCls:'icon-ext-xls'" suffix="xls" data-bind="click:downloadClick">Excel2003   </div>
    <div data-options="iconCls:'icon-page_excel'" suffix="xlsx" data-bind="click:downloadClick">Excel2007   </div>
    <div data-options="iconCls:'icon-ext-doc'" suffix="doc" data-bind="click:downloadClick">Word2003    </div>
</div>

<div id="condition" class="container_12" style="position:relative;">
    <div class="grid_1 lbl">设备类别</div>
    <div class="grid_2 val"><input type="text" data-bind="lookupValue:form.Sbda_lbbh" class="z-txt easyui-lookup" data-options="lookupType:'sblbzd',parentField:'pid',multiple:false"/></div>
    <div class="grid_1 lbl">设备状态</div>
    <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.sbztItems ,comboboxValue:form.Sbda_Sbzt" class="z-txt easyui-combobox" data-options="showblank:true"/></div>
    <div class="grid_1 lbl">设备名称</div>
    <div class="grid_2 val"><input type="text" data-bind="value:form.Sbda_Sbmc" class="z-txt" /></div>
    <div class="clear"></div>
    <div class="grid_1 lbl">建档日期</div>
    <div class="grid_2 val"><input type="text" data-bind="value:form.CreateDate" formatter="com.formatDate" class="z-txt easyui-daterange" /></div>
    <div class="clear"></div>

    <div class="prefix_9" style="position:absolute;top:5px;height:0;">
        <a id="a_search" href="#" class="button button-blue" style="margin:0 15px;" data-bind="click:searchClick">查询</a>
        <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">清空</a>
    </div>
</div>


<table id="gridlist" data-bind="datagrid:grid">
    <thead>
        <tr>
            <th field="Sblbzd_Lbmc"    sortable="true" align="left"    width="100"  >设备类别  </th> 
            <th field="Sbda_Sbbm"    sortable="true" align="left"    width="100"  >设备编码  </th> 
            <th field="Sbda_Sbmc"    sortable="true" align="left"    width="150"  >设备名称  </th> 
            <th field="Sbda_Ggxh"    sortable="true" align="left"    width="160"  >规格型号   </th>  
            <th field="Sbda_Sbzt"    sortable="true" align="center"    width="80"   editor="{type: 'combobox', options:{data:data.dataSource.sbztItems}}" >设备状态 </th>   
            <th field="Sbda_Sydwmc"    sortable="true" align="left"    width="150" >使用单位</th>
            <th field="Sbda_Sbcs"    sortable="true" align="left"    width="150" >生产厂商</th> 
            <th field="Sbda_Zzcs"    sortable="true" align="left"    width="150"  >制造厂商</th> 
            <th field="Sbda_Gzf"    sortable="true" align="right"    width="60"  formatter="com.formatMoney" >购置费</th>  
            <th field="CreatePerson"    sortable="true" align="left"    width="60"  >创建人</th>  
            <th field="CreateDate"    sortable="true" align="left"    width="80" formatter="com.formatDate" >创建时间</th>   
        </tr>
    </thead>
</table>
